
#if !defined(CUPA_ENCODE_H_JKSIEN983JKS8__INCLUDE_)
#define CUPA_ENCODE_H_JKSIEN983JKS8__INCLUDE_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <string>
#include <iostream>
#include <sstream>

std::string base64_encode(unsigned char const* , unsigned int len);
std::string base64_decode(std::string const& s);

std::string UTF8_To_string(const std::string & str);
std::string string_To_UTF8(const std::string & str);
std::string GBK_To_UTF8(const std::string & strGBK);
std::string UTF8_To_GBK(const std::string & strUTF8);

LPCWSTR stringToLPCWSTR(std::string orig);
std::wstring str_to_wstr(const std::string& s);
std::string wstr_to_str(const std::wstring& s);

template <class T> 
std::string ConvertToString(T value) {
	std::stringstream ss;
	ss << value;
	return ss.str();
}

std::string str_to_currency(const std::string &str);
std::string str_to_int(const std::string &str);

std::string str_trim(std::string &str);
std::string str_trim_left(std::string &str);

std::string get_uuid();

std::string UrlEncode(std::string& str);

#endif // CUPA_ENCODE_H_JKSIEN983JKS8__INCLUDE_